package com.ssy.lingxi.platform.manage.controller.paas;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.platform.manage.api.model.dto.currency.CurrencyPAASDTO;
import com.ssy.lingxi.platform.manage.service.paas.ICurrencyPAASService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @menu 币制 - （系统初始化）PAAS接口
 * @author fhj
 * @version 2.0.0
 * @date 2020/9/17
 */
@Api(tags = "币制 - （系统初始化）PAAS接口")
@RestController
@RequestMapping("/manage/paas/currencyPAAS")
public class CurrencyPAASController {

    @Resource
    private ICurrencyPAASService currencyPAASService;

    @ApiOperation(value = "新增")
    @PostMapping("/add")
    public Wrapper<Void> add(@RequestBody CurrencyPAASDTO dto) {
        return currencyPAASService.add(dto);
    }

    @ApiOperation(value = "修改")
    @PostMapping("/update")
    public Wrapper<Void> update(@RequestBody CurrencyPAASDTO dto) {
        return currencyPAASService.update(dto);
    }

    @ApiOperation(value = "删除")
    @PostMapping("/delete")
    public Wrapper<Void> delete(@RequestBody CurrencyPAASDTO dto) {
        return currencyPAASService.delete(dto);
    }

    @ApiOperation(value = "停用/启用")
    @PostMapping("/state")
    public Wrapper<Void> state(@RequestBody CurrencyPAASDTO dto) {
        return currencyPAASService.state(dto);
    }
}
